/**
 * 项目名：化工企业安全生产信息化管理平台
 * 日期：    2020-03-01 22:19:08
 * Copyright (c) 2015- -版权所有
 */

package com.joysuch.wwyt.edu.service;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.core.exception.BusinessRestrictionsException;
import com.joysuch.wwyt.edu.bean.*;
import com.joysuch.wwyt.edu.bean.EduExamRecordListBean.SearchEduExamRecord;
import com.joysuch.wwyt.edu.entity.EduExamRecord;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;

public interface EduExamRecordService {

    public EduExamRecord add(EduExamRecordEditBean entity);

    void update(EduExamRecordEditBean entity);

    Page<EduExamRecordListBean> findByPage(Pageable page, SearchEduExamRecord condition);

    void delete(Long id) throws BusinessRestrictionsException;

    EduExamRecordDetailBean getById(Long id);

    EduExamRecord findById(Long id);

    ResultBean userInfoExam(Long userId, Pageable pageable);

    /**
     * 查询答题明细详情
     *
     * @param examRecordId
     *                         考试记录ID
     *                         用户ID
     * @return
     */
    public ResultBean queryUserExamRecordAnswerList(Long examRecordId);

    public void deleteAll(List<Long> ids);

    public void batchDeleteByExamIdAndUserId(Long examId, List<Long> userIdList);

    IPage<EduExamRecord> queryExamRecords(EduTrainTimeBean eduTrainTimeBean,Integer pageNo,Integer pageSize);

    /**
     *  根据考试id批量导出考试试卷
     * @param examId
     */
    void exportPdf(Long examId, HttpServletResponse response,String userIds);

}
